package no.ntnu.fp.su.sensors;

import no.ntnu.fp.su.Flow;
import no.ntnu.fp.su.util.NormalDistribution;

/**
 * A temperature sensor.
 */
public class TemperatureSensor implements Sensor {
	private Flow flow;
	private double metersFromReservoir;
	private static double samplingError = 0.08;
	public TemperatureSensor(Flow flow, double metersFromReservoir) {
		this.flow=flow;
		this.metersFromReservoir=metersFromReservoir;
	}
	public double sample() {
		return NormalDistribution.sample(flow.getTemperature(metersFromReservoir),samplingError);
	}
	
}
